Skip Headers

Oracle® Database Platform Guide 10g Release 2 (10.2) for Microsoft Windows (64-Bit) on Intel Itanium Part Number B14305-02 |
Home | Book List | Contents | Master Index | Feedback

Previous | Next
| View PDF

Beta Draft

# E Oracle Database Windows/UNIX Differences

This chapter lists major differences between Oracle Database on Windows and UNIX. For Oracle Database developers and database administrators moving from a UNIX platform to Windows, this information can be helpful in understanding Windows features that are relevant to Oracle Database.

This chapter contains these topics:

- Automatic Startup and Shutdown

- Background Processing and Batch Jobs

- Diagnostic and Tuning Utilities

- Direct Writes to Disk

- Dynamic Link Libraries (DLLs)

- Hot Backups

- Initialization Parameters: Multiple Database Writers

- Install Accounts and Groups

- Installation

- Memory Resources

- Microsoft Transaction Server

- Multiple Oracle Homes and OFA

- Processes and Threads

- Raw Partitions

- Services

## E.1 Automatic Startup and Shutdown

On UNIX, several files and scripts in different directories are used to start an instance automatically. Other scripts are run on computer shutdown, allowing applications such as Oracle Database to shut down cleanly.

For automatic startup on Windows, set registry parameter `ORA_``SID``_AUTOSTART` to `true` using an Oracle Database tool such as ORADIM. Enter the following with parameters at the command prompt:

    C:\> oradim options

To start the listener automatically, set services startup type to automatic.

For automatic shutdown on Windows, set registry parameters `ORA_SHUTDOWN` and `ORA_``SID``_SHUTDOWN` to stop the relevant OracleServiceSID and shut down. Set registry parameter `ORA_``SID``_SHUTDOWNTYPE` to control shutdown mode (default is `i`, or `immediate`).

See Also: Chapter 5, "Administering a Database on Windows" Oracle Database 2 Day DBA

## E.2 Background Processing and Batch Jobs

UNIX provides sophisticated control mechanisms for background processing and batch jobs.

For similar functionality on Windows, use the AT command or a GUI version in the Microsoft Resource Kit.

## E.3 Diagnostic and Tuning Utilities

On UNIX, utilities such as `sar` and `vmstat` are used to monitor Oracle Database background and shadow processes. These utilities are not integrated with Oracle Database.

Performance utilities available on Windows include Oracle Counters for Windows Performance Monitor, Task Manager, Control Panel, Event Viewer, User Manager, and Microsoft Management Console (included only with Windows 2000).

Oracle Database is integrated with several of these tools. For example:

- Oracle Counters for Windows Performance Monitor displays key Oracle Database information. This tool is the same in appearance and operation as Windows Performance Monitor, except it has been preloaded with Oracle Database performance elements.

- Event Viewer displays system alert messages, including Oracle Database startup/shutdown messages and audit trail.

- Task Manager on Windows displays currently running processes and their resource usage, similar to the UNIX `ps -ef` command or HP OpenVMS `SHOW SYSTEM`. But Task Manager is easier to interpret and the columns can be customized.

  See Also: Chapter 2, "Database Tools on Windows" Chapter 6, "Monitoring a Database on Windows"

## E.4 Direct Writes to Disk

On both UNIX and Windows platforms, bypassing the file system buffer cache ensures data is written to disk.

On UNIX, Oracle Database uses the `O_SYNC` flag to bypass the file system buffer cache. The flag name depends on the UNIX port.

On Windows, Oracle Database bypasses the file system buffer cache completely.

## E.5 Dynamic Link Libraries (DLLs)

Shared libraries on UNIX are similar to shared DLLs on Windows. Object files and archive libraries are linked to generate Oracle Database executables. Relinking is necessary after certain operations, such as installation of a patch.

On Windows, Oracle Database DLLs form part of the executable at run time and are therefore smaller. DLLs can be shared between multiple executables. Relinking by the user is not supported, but executable images can be modified using ORASTACK.

Modifying executable images on Windows reduces the chances of running out of virtual memory when using a large SGA or when supporting thousands of connections. However, Oracle recommends doing this only under the guidance of Oracle Support Services.

## E.6 Hot Backups

A (manual) hot backup is equivalent to backing up a tablespace that is in offline backup mode.

Backup strategy on UNIX is as follows: put the tablespace into backup mode, copy the files to the backup location, and bring the tablespace out of backup mode.

Windows supports the same backup strategy, but you cannot copy files in use with normal Windows utilities. Use OCOPY to copy open database files to another disk location. Then use a utility to copy the files to tape.

## E.7 Initialization Parameters: Multiple Database Writers

On UNIX, you can specify more than one database writer process with initialization parameter `DB_WRITERS`. Multiple database writers can help, for example, when a UNIX port does not support asynchronous I/O.

`DB_WRITERS` is supported but typically unnecessary on Windows, which has its own asynchronous I/O capabilities.

See Also: Chapter 13, "Oracle Database Specifications for Windows"

## E.8 Install Accounts and Groups

UNIX uses the concept of a DBA group. The root account cannot be used to install Oracle Database. A separate Oracle Database account must be created manually.

On Windows, Oracle Database must be installed by a Windows username in the Administrators group. The username is automatically added to the Windows local group `ORA_DBA`, which receives the SYSDBA privilege. This allows the user to log in to the database using `CONNECT` `/` `AS SYSDBA` and not be prompted for a password.

Password files are located in the `ORACLE_BASE``\``ORACLE_HOME``\database` directory and are named `pwd` `SID``.ora`, where `SID` identifies the Oracle Database instance.

See Also: Chapter 5, "Administering a Database on Windows"

## E.9 Installation

The following manual setup tasks, all required on UNIX, are not required on Windows:

- Set environment variables

- Create a DBA group for database administrators

- Create a group for users running Oracle Universal Installer

- Create an account dedicated to installing and upgrading Oracle Database components

See Also: Oracle Database Installation Guide for Microsoft Windows (64-Bit) on Intel Itanium

## E.10 Memory Resources

The resources provided by the UNIX default kernels are often inadequate for a medium or large instance of Oracle Database. The maximum size of a shared memory segment (`SHMMAX`) and maximum number of semaphores available (`SEMMNS`) may be too low for Oracle Database recommendations.

On Windows, fewer resources are needed for interprocess communication (IPC), because the Oracle Database relational database management system is thread-based and not process-based. These resources, including shared memory and semaphores, are not adjustable by the user.

## E.11 Microsoft Transaction Server

UNIX does not support Microsoft Transaction Server.

Windows supports Microsoft Transaction Server beginning with Oracle8. Using Oracle Services for Microsoft Transaction Server, you can develop and deploy applications based on COM/COM+. Microsoft Transaction Server coordinates application transactions for Oracle Database.

See Also: Oracle Services for Microsoft Transaction Server Developer's Guide

## E.12 Multiple Oracle Homes and OFA

The goal of OFA is to place all Oracle Database software under one ORACLE_HOME directory and to spread database files across different physical drives as databases increase in size. OFA is implemented on Windows and UNIX in the same way, and main subdirectory and filenames are the same on both operating systems. Windows and UNIX differ, however, in their OFA directory tree top-level names and in the way variables are set.

On UNIX, `ORACLE_BASE` is associated with a user's environment. ORACLE_HOME and `ORACLE_SID` must be set in system or user login scripts. Symbolic links are supported. Although everything seems to be in one directory on the same hard drive, files may be on different hard drives if they are symbolically linked or have that directory as a mount point.

On Windows, `ORACLE_BASE` is defined in the registry (for example, in `HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0`). `ORACLE_HOME` and `ORACLE_SID` are variables defined in the registry. Symbolic links like those on UNIX are not supported, although Microsoft has announced the intention to support them in a future release.

See Also: Appendix B, "Optimal Flexible Architecture" in Oracle Database Installation Guide for Microsoft Windows (64-Bit) on Intel Itanium

## E.13 Processes and Threads

On UNIX, Oracle Database uses a process to implement each of such background tasks as database writer (`DBW0`), log writer (`LGWR`), shared server process dispatchers, and shared servers. Each dedicated connection made to the database causes another operating system process to be spawned on behalf of that session.

On Windows, each background process is implemented as a thread inside a single, large process. For each Oracle Database instance or system identifier, there is one corresponding process for Oracle Database. For example, 100 Oracle Database processes for a database instance on UNIX are handled by 100 threads inside one process on Windows.

All Oracle Database background, dedicated server, and client processes are threads of the master Oracle Database Windows process, and all threads of the Oracle Database process share resources. This multithreaded architecture is highly efficient, allowing fast context switches with low overhead.

To view processes or end individual threads, use Oracle Administration Assistant for Windows. Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Administration Assistant for Windows. Right-click the `SID` and choose Process Information.

Note: Microsoft Management Console (MMC) is started when Oracle Administration Assistant for Windows is started. Oracle Database has integrated several database administration snap-ins into MMC.

See Also: Oracle Administration Assistant for Windows online help Chapter 1, "Oracle Database Architecture on Windows"

## E.14 Raw Partitions

Datafiles for tablespaces may be stored on a file system or on raw partitions. A raw partition is a portion of a physical disk that is accessed at the lowest possible level.

UNIX supports raw partitions (logical drives). There is no limitation on the number of disk drives.

Windows is limited to using drive letters A-Z, but creating raw partitions lets you bypass the disk drive limitation and divide disks into smaller sections.

Use Windows disk management tools to create an extended partition on a physical drive. An extended partition points to raw space on the disk that can be assigned multiple logical partitions for database files.

An extended partition avoids the four-partition limit on Windows by allowing you to define large numbers of logical partitions to accommodate applications using Oracle Database. Logical partitions can then be given symbolic link names to free up drive letters.

Note: Raw partitions are necessary for shared datafiles in an Oracle Real Application Clusters environment, available on Windows. Oracle Real Application Clusters, in which Oracle Database instances run on all nodes simultaneously, provides clustering and high availability.

## E.15 Services

Windows services are similar to UNIX daemons.

Oracle Database registers a database instance as a service (OracleServiceSID). Services start background processes.

To connect to and use an Oracle Database instance, an Oracle Database service is created during database creation and associated with Oracle Database. Once a service is created with Oracle Database, the service can run even while no user is logged on.

By default, services run under the SYSTEM account. Choose Start `>` Settings `>` Control Panel `>` Services to access the Services dialog.

See Also: Chapter 5, "Administering a Database on Windows"